{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "URL: http://bokeh.pydata.org/en/latest/docs/gallery/texas.html\n",
    "\n",
    "Most examples work across multiple plotting backends, this example is also available for:\n",
    "\n",
    "* [Bokeh - texas choropleth example](../bokeh/texas_choropleth_example.ipynb)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import holoviews as hv\n",
    "hv.extension('matplotlib')\n",
    "hv.output(fig='svg')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Declaring data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from bokeh.sampledata.us_counties import data as counties\n",
    "from bokeh.sampledata.unemployment import data as unemployment\n",
    "\n",
    "counties = [dict(county, Unemployment=unemployment[cid])\n",
    "            for cid, county in counties.items()\n",
    "            if county[\"state\"] == \"tx\"]\n",
    "\n",
    "choropleth = hv.Polygons(counties, ['lons', 'lats'], [('detailed name', 'County'), 'Unemployment'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "choropleth.opts(\n",
    "    color='Unemployment', edgecolor='white',\n",
    "    xaxis=None, yaxis=None, show_grid=False,\n",
    "    show_frame=False, colorbar=True, fig_size=200)"
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python",
   "pygments_lexer": "ipython3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
